package com.zcl.demo7.presenter;

import com.zcl.demo7.bean.HomeBean;
import com.zcl.demo7.contract.HomeContract;
import com.zcl.demo7.model.HomeModel;

public class HomePresenter implements HomeContract.Presenter {
    private HomeContract.View view;
    private HomeModel homeModel;

    public HomePresenter(HomeContract.View view) {
        this.view = view;
         homeModel = new HomeModel();
    }

    @Override
    public void getData() {
        homeModel.getData(new HomeContract.CallBack() {
            @Override
            public void getSuccess(HomeBean bean) {
                view.getSuccess(bean);
            }

            @Override
            public void getFile(String msg) {
                view.getFile(msg);
            }
        });
    }
}
